package cn.apestar.common.chat;

import cn.apestar.common.chat.impl.ChatHuanXian;
import cn.apestar.common.chat.model.EasemobConfig;
import cn.apestar.core.http.AppType;

/**
 * 聊天对象
 * @author lvh
 */
public class ChatInstance {

    /**
     * 取得聊天对象
     * @return
     */
    public static Chat getChat(String type) {

        if (AppType.PARENT.getValue().equals(type)) {
            return new ChatHuanXian(EasemobConfig.initWt());
        } else if (AppType.ORG.getValue().equals(type)) {
            return new ChatHuanXian(EasemobConfig.initWt());
        } else if (AppType.NTO.getValue().equals(type)) {
            return new ChatHuanXian(EasemobConfig.initWy());
        } else if (AppType.APESTAR.getValue().equals(type)) {
            return new ChatHuanXian(EasemobConfig.initYr());
        } else if (AppType.TMONK_TRADER.getValue().equals(type)) {
            return new ChatHuanXian(EasemobConfig.initTs());
        } else if (AppType.TMONK_CUSTOMER.getValue().equals(type)) {
            return new ChatHuanXian(EasemobConfig.initTs());
        } else if (AppType.PLAY_CUSTOMER.getValue().equals(type)) {
            return new ChatHuanXian(EasemobConfig.initWZ());
        } else if (AppType.PLAY_TRADER.getValue().equals(type)) {
            return new ChatHuanXian(EasemobConfig.initWZ());
        } else if (AppType.ANT_CUSTOMER.getValue().equals(type)) {
            return new ChatHuanXian(EasemobConfig.initAnt());
        } else if (AppType.ANT_TRADER.getValue().equals(type)) {
            return new ChatHuanXian(EasemobConfig.initAnt());
        }
        return null;
    }

}
